package com.sensePlusVR.utils;

import java.util.Comparator;

import com.sensePlusVR.bean.CollectionItem;

public class CollectionTopSort implements Comparator<CollectionItem> {

	@Override
	public int compare(CollectionItem collectionItem0,
			CollectionItem collectionItem1) {
		//collectionItem0.getTopSort() 大于collectionItem1.getTopSort() return -1为降序，return 1为升序
		if (collectionItem0.getTopSort() > collectionItem1.getTopSort()) {
			return -1;
		} else if (collectionItem0.getTopSort() == collectionItem1.getTopSort()) {
			return 0;
		}
		return 1;
	}

}
